<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\GoodsController;
use App\Http\Controllers\BMIController;
use App\Http\Controllers\AddressController;
use App\Http\Controllers\OrderController;
use App\Http\Controllers\DelayQueueController;
use \App\Http\Controllers\MiaoController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get("bmi", [BMIController::class, 'quantityOfHeat']);
Route::get("index", [GoodsController::class, 'index']);


Route::get("goods/sku", [GoodsController::class, 'particulars']);
Route::get("goods/date", [GoodsController::class, 'date']);
Route::get("cart/save", [GoodsController::class, 'saveCart']);
Route::get("cart/list", [GoodsController::class, 'cartList']);
Route::get("cart/del", [GoodsController::class, 'delCart']);
Route::get("cart/upd", [GoodsController::class, 'updCart']);
Route::get("user/address", [AddressController::class, 'index']);
Route::get("order/index", [OrderController::class, 'index']);
Route::get("redis/lpush", [DelayQueueController::class, 'delayQueue']);
Route::get("mon/mon", [\App\Http\Controllers\MongoDBController::class, 'index']);
Route::get("maze/echo", [\App\Http\Controllers\MazeController::class, 'maze']);
Route::post("likou", [GoodsController::class, 'twoSum']);



Route::post("m/add", [MiaoController::class, 'addRedisGoods']);
Route::post("m/end", [MiaoController::class, 'endMiao']);
Route::post("m/order", [MiaoController::class, 'AddMiaoOrder']);
